CC= g++
LD= g++ 

OBJECTS= main.o \
Tools/Exceptions.o \
Tools/Logger.o \
Tools/LoggerConsole.o \
Tools/mat44.o \
Vision/Camera.o \
Vision/VisionTools.o \
Calibration/Dataset.o \
Calibration/PositionSet.o \
Calibration/Processor.o \
Calibration/Pattern.o \
Viewer/Camera.o 

CFLAGS= -Wall -pipe -I/vol/shell/opencv/opencv-1.0.0/include -I/vol/shell/opencv/opencv-1.0.0/include/opencv
LDFLAGS= -lm -lGL -lglut -L/vol/shell/opencv/opencv-1.0.0/lib -lcvaux -lhighgui -lcxcore -lcv -ml

# variables de configuration pour l'utilisation des differentes librairies :
# pour utiliser une librairie supplementaire (apres l'avoir installee) enlevez
# commentaires (les #) devant les lignes CFLAGS+= ... et LDFLAGS+= ...

# construction du projet
calibration: $(OBJECTS)
	$(CC) $(LDFLAGS) -o $@ $+

# regles de compilation
%.o: %.cpp
	$(CC) $(CFLAGS) -c $< -o $@

# generation des dependances automatique
%.d: %.cpp
	$(CC) $(CFLAGS) -o $@ -MM $<

.PHONY: clean
clean: 
	rm -f *.o *.d
